package com.link.base.base.common.service;

import com.link.base.base.common.dao.mybatis.mapper.ReadingRecordMapper;
import com.link.base.base.common.model.ReadingRecord;
import com.link.core.basic.dao.mapper.BasicMapper;
import com.link.core.basic.service.BasicServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author: weixuan
 * @date: 2019-01-22
 * @comments: 阅读记录
 */
@Service
public class ReadingRecordServiceImpl extends BasicServiceImpl<ReadingRecord> implements ReadingRecordService {

    @Resource
    private ReadingRecordMapper readingRecordMapper;

    @Override
    public BasicMapper<ReadingRecord> getBasicMapper() {
        return readingRecordMapper;
    }
/**
 * desc    暂时注释掉解决重复阅读报错问题
 * @author libo
 * @date   2019-07-10
 */
//    @Override
//    public void beforInsert(ReadingRecord entity) throws Exception {
//        List<ReadingRecord> readingRecordList = readingRecordMapper.queryByExamplePage(entity);
//        if (readingRecordList != null && readingRecordList.size() > 0) {
//            throw new ServiceException("PUBLIC-025");
//        }
//    }

}

